<!doctype html>
<html lang="en-US">
<head>
    <meta charset="UTF-8">
    <title></title>
    <script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script>
</head>
<body>
    <button onclick="addHistory()">add history</button>
    <a href="#" id="test">test</a>
    <button id="img">test</button>
    <script type="text/javascript">
        function addHistory(){
            history.pushState({"name":"san"},"title","#history=page1_step0");
        }

        window.addEventListener("hashchange",function(){
              debugger;
        },false);

        document.querySelector('#test').addEventListener('click',function(event){
            console.log('click');
        },false);



        $(document).on('a click',function(event){
            if($(event.target).attr('href') == '#'){
                event.preventDefault();
            }
        });
    </script>


    <button id="testAjax">testajaxByUrl</button>
    <script type="text/javascript">
        $('#testAjax').on('click',function(){
           history.pushState("","","./testAjax/a/b/c");
            if(confirm("continue")){
                $.ajax({
                    url:"./history.html",
                    async:true
                });
            };
        });
    </script>


</body>
</html>